/*
 * EatStew.java
 *
 * Created on March 27, 2007, 4:25 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package ai9hells.pgaibe.chapter2.westworldwithmessaging;

import ai9hells.pgaibe.common.fsm.State;
import ai9hells.pgaibe.common.messaging.Telegram;

/**
 *
 * @author andre.bandarra
 */
public class EatStew extends State<Miner>{
    public static final EatStew INSTANCE = new EatStew();
    /** Creates a new instance of EatStew */
    private EatStew() {
    }

    public void enter(Miner m) {
        System.out.println(EntityNames.getNameOfEntity(m.getId())+": Smells Reaaal goood Elsa!");
    }

    public void execute(Miner m) {
        System.out.println(EntityNames.getNameOfEntity(m.getId())+": Tastes real good too!");
        m.getStateMachine().revertToPreviousState();
    }

    public void exit(Miner m) {
        System.out.println(EntityNames.getNameOfEntity(m.getId())+": Thankya li'lle lady. Ah better get back to whatever ah wuz doin'");
    }

    public boolean onMessage(Miner m, Telegram t) {
        return false;
    }
    
}
